<?php $this->load->view("common/page_header");
$feeback_type_array = array('1' => '虚假信息', '2' => '交易欺诈 ', '3'=>'不当言论', '4'=>'其他');?>
<div id="body_main">
	<div id="admin_header">
		<?php $this->load->view('common/admin_header'); ?>
		<div class="top_cleft">
			<ul>
				<li><a href="/console/stories/story_scroller">滚动信息</a></li>
				<li class="current"><a href="/console/stories">事项删除</a></li>
			</ul>
			<div class="clear"></div>
		</div>
	</div>
	<div id="admin_content">
		<div id="admin_navigator">
			<ul class="navigator">
				<li><a href="/console/stories">删除事项</a></li>
				<li class="current"><a href="/console/stories/closed">已删除事项</a></li>
			</ul>
		</div>
		<div id="admin_body">
			<div class="margin_top15 margin_bottom10">
				<span class="bold">已经删除的事项</span>
				<a href="javascript:void(0)" id="restore-button" class="orange_button" style="float:right;#margin-top:-26px;">恢复</a>
				<a href="javascript:void(0)" id="delete-button" class="orange_button margin_right15" style="float:right;#margin-top:-26px;">清除</a>
				<div class="clear"></div>
			</div>
			<form method="post" action="" id="stories-form">
			<table class="a_table">
				<tr>
					<th><input type="checkbox" id="check-all" />全选</th>
					<th>事项编号</th>
					<th>发布人</th>
					<th>删除原因</th>
					<th class="text_left">标题</th>
					<th>关闭时间</th>
				</tr>
				<?php if (!empty($stories)) {?>
				<?php foreach ($stories as $story) { ?>
				<tr>
					<td><input type="checkbox" name="ids[]" value="<?php echo $story['id'];?>"/></td>
					<td><?php echo 1000000 + $story['id'];?></td>
					<td><a href="/user/show?user_id=<?php echo $story['created_by']?>"><?php echo $story['nickname']?></a></td>
					<td><?php echo $feeback_type_array[$story['type']]?></td>
					<td class="text_left"><span class="red"><?php echo $story['bonus'];?>元</span>|<?php echo $story['title'];?></td>
					<td><?php echo $story['created'];?></td>
				</tr>
				<?php } ?>
				<?php }?>
			</table>
			<input type="hidden" name="act" id="act"></input>
			</form>
		</div>
		<div class="clear"></div>
	</div>
	<?php $this->load->view("common/footer");?>	
</div>
<script type="text/javascript">
$(document).ready(function(){
	$("#check-all").click(function() {
		if ($("#check-all").attr("checked")) {
			$("input[name='ids[]']").attr("checked", true);
		} else {
			$("input[name='ids[]']").attr("checked", false);
		}
	});
	$("#restore-button").click(function() {
		$("#act").val("restore");
		$("#stories-form").submit();
	});
	$("#delete-button").click(function() {
		$("#act").val("delete");
		$("#stories-form").submit();
	});
});
</script>	
<?php $this->load->view("common/page_footer");?>